import requests
from lxml import etree

cookies = {
    'admin': 'a550659b6df34a033b61f2ed97dd2673',
    'Hm_lvt_ab0153f5f064a819a91a3699f63f86e3': '1699602345',
    'Hm_lpvt_ab0153f5f064a819a91a3699f63f86e3': '1699842725',
}

headers = {
    'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
    'Accept-Language': 'zh-CN,zh;q=0.9',
    'Cache-Control': 'max-age=0',
    'Connection': 'keep-alive',
    'Content-Type': 'application/x-www-form-urlencoded',
    # 'Cookie': 'admin=a550659b6df34a033b61f2ed97dd2673; Hm_lvt_ab0153f5f064a819a91a3699f63f86e3=1699602345; Hm_lpvt_ab0153f5f064a819a91a3699f63f86e3=1699842725',
    'Origin': 'http://spiderbuf.cn',
    'Referer': 'http://spiderbuf.cn/e01/',
    'Upgrade-Insecure-Requests': '1',
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36',
}

data = {
    'username': 'admin',
    'password': '123456',
}

response = requests.post('http://spiderbuf.cn/e01/list', cookies=cookies, headers=headers, data=data, verify=False)
etree = etree.HTML(response.text)
th = etree.xpath('//tr/th')
for item in th:
    print(item.text)

trs = etree.xpath('//tr')
for item in trs:
    for i in item.xpath('./td'):
        print(i.text)

